package midalgorithms.sortandsearch;

import java.util.Arrays;

public class _03FindKthLargest {
    public static int findKthLargest(int[] nums, int k) {
        //  第k大的元素对应排序后的下标为 nums.length - k
        Arrays.sort(nums);
        return nums[nums.length - k];
    }
}
